import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [{
    path: '/',
    name: 'home',
    component: () =>
        import ('../views/home.vue'),
    children: [{
            path: '',
            redirect: '/poem'
        },
        {
            path: '/poem',
            name: 'poem',
            component: () =>
                import ('../views/poem.vue'),
        }, {
            path: '/soup',
            name: 'soup',
            component: () =>
                import ('../views/soup.vue'),
        }, {
            path: '/sentence',
            name: 'sentence',
            component: () =>
                import ('../views/sentence.vue'),
        }
    ]
}, ]

const router = new VueRouter({
    routes
})

export default router